﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageCommonCode.aspx.cs"
    Inherits="Viewer.Code.PageCommonCode" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager Locale="en" ID="ResourceManager1" runat="server" DirectMethodNamespace="X">
        <Listeners>
            <BeforeAjaxRequest Handler="Ext.net.Mask.show();" />
            <AjaxRequestComplete Handler="Ext.net.Mask.hide();" />
            <AjaxRequestException Handler="Ext.net.Mask.hide();" />
        </Listeners>
    </ext:ResourceManager>
    <div>
        <ext:Panel runat="server" Width="500">
            <Items>
                <ext:Container runat="server" Layout="FormLayout" LabelWidth="100">
                    <Items>
                        <ext:ComboBox ID="cboListCode" runat="server" ValueField="CodeIDType" DisplayField="CodeKey"
                            FieldLabel="Loại mã">
                            <Store>
                                <ext:Store runat="server">
                                    <Reader>
                                        <ext:JsonReader IDProperty="CodeID">
                                            <Fields>
                                                <ext:RecordField Name="CodeKey" />
                                                <ext:RecordField Name="CodeIDType" />
                                                <ext:RecordField Name="GhiChu" />
                                            </Fields>
                                        </ext:JsonReader>
                                    </Reader>
                                </ext:Store>
                            </Store>
                            <Listeners>
                                <Select Handler="" />
                            </Listeners>
                        </ext:ComboBox>
                        <ext:Label ID="lblGhiChu" runat="server" Text="" FieldLabel="Ghi Chú">
                        </ext:Label>
                    </Items>
                </ext:Container>
                <ext:BoxComponent runat="server" />
                <ext:CompositeField runat="server">
                    <Items>
                        <ext:Button ID="btnView" runat="server" Text="Xem">
                        </ext:Button>
                        <ext:Button ID="btnAdd" runat="server" Text="Thêm">
                        </ext:Button>
                    </Items>
                </ext:CompositeField>
                <ext:BoxComponent ID="BoxComponent1" runat="server" />
                <ext:GridPanel ID="grdCommonCode" runat="server">
                    <ColumnModel>
                        <Columns>
                            <ext:CommandColumn Width="40">
                                <Commands>
                                    <ext:GridCommand>
                                        <Menu>
                                            <Items>
                                                <ext:MenuCommand CommandName="Add" Text="Tạo mới" Icon="Add" />
                                                <ext:MenuCommand CommandName="View" Text="Xem chi tiết" Icon="LayoutHeader" />
                                                <ext:MenuCommand CommandName="Edit" Text="Sửa" Icon="ApplicationEdit" />
                                                <ext:MenuCommand CommandName="Delete" Text="Xóa" Icon="Delete" />
                                            </Items>
                                        </Menu>
                                    </ext:GridCommand>
                                </Commands>
                            </ext:CommandColumn>
                            <ext:Column Width="100" Header="Chuỗi Mã" DataIndex="CodeString" />
                            <ext:Column Width="100" Header="Khóa Mã" DataIndex="CodeKey" />
                            <ext:Column Width="100" Header="Giá Trị Mã" DataIndex="CodeValue" />
                            <ext:Column Width="100" Header="Loại Mã" DataIndex="CodeIDType" />
                            <ext:Column Width="100" Header="Mã Cha" DataIndex="CodeIDCha" />
                            <ext:Column Width="100" Header="Ghi Chú" DataIndex="GhiChu" />
                        </Columns>
                    </ColumnModel>
                    <Store>
                        <ext:Store ID="Store1" runat="server">
                            <Reader>
                                <ext:JsonReader IDProperty="CodeID">
                                    <Fields>
                                        <ext:RecordField Name="CodeIDCha" />
                                        <ext:RecordField Name="CodeIDType" />
                                        <ext:RecordField Name="CodeKey" />
                                        <ext:RecordField Name="CodeString" />
                                        <ext:RecordField Name="CodeValue" />
                                        <ext:RecordField Name="GhiChu" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                        </ext:Store>
                    </Store>
                </ext:GridPanel>
            </Items>
        </ext:Panel>
    </div>
    </form>
</body>
</html>
